<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../js/layui/css/layui.css">
    <script src="../js/layui/layui.js"></script>
</head>
<body>
<form id="productForm" class="layui-form" method="post" lay-filter="productFilter">
    <div class="layui-form-item">
        <div class="layui-inline">
            <input type="hidden" id="id" name="id">
            <label class="layui-form-label">职位名称</label>
            <div class="layui-input-inline">
                <input type="text" name="workname" placeholder="职位名称" autocomplete="off" class="layui-input">
            </div>
            <label class="layui-form-label">工作地点</label>
            <div class="layui-input-inline">
                <input type="text" name="workingplace" placeholder="工作地点" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">期望工资</label>
            <div class="layui-input-inline">
                <input type="text" name="wage" placeholder="期望工资" autocomplete="off" class="layui-input">
            </div>
            <label class="layui-form-label">行业</label>
            <div class="layui-input-inline">
                <input type="text" name="hangye" placeholder="行业" autocomplete="off" class="layui-input">
            </div>
        </div>

        <!--<label class="layui-form-label">期望工资</label>
        <div class="layui-input-block">
           <select name="wage">
                <option value="9">9</option>
                <option value="11">11</option>
                <option value="11-15">11-15</option>
                <option value="13">13</option>
                <option value="15">15</option>
                <option value="16">16</option>
                <option value="17">17</option>
                <option value="18">18</option>
                <option value="19">19</option>
            </select>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">行业</label>
            <div class="layui-input-block">
                <select name="hangye">
                    <option value="1">计算机软件</option>
                    <option value="2">计算机服务</option>
                    <option value="3">高工资</option>
                    <option value="4">档次高</option>
                </select>
            </div>
        </div>-->
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">求职时间</label>
        <div class="layui-input-block">
            <input id="ad" type="text" name="qiuzhidate"  placeholder="" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-row layui-col-space10">
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">自我评价</label>
            <div class="layui-input-block">
                <textarea name="pingjia" placeholder="例如：两年UI设计经验，熟悉IOS和Android的界面设计规划，对产品本色有独特见解，有一定的手绘能力" class="layui-textarea"></textarea>
            </div>
        </div>
    </div>
    <div class="layui-row layui-col-space10">
        <div class="layui-col-md3">
            <label class="layui-form-label">工作性质</label>
            <div class="layui-input-block">
                <input type="radio" name="worktype" value="1">全职
                <input type="radio" name="worktype" value="2">实习
                <input type="radio" name="worktype" value="3">兼职
            </div>
        </div>
    </div>
</form>
</body>
<script>
    var $;
    layui.use(['form', 'layedit', 'laydate'], function() {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate;
        $=layui.jquery;
        //日期
        laydate.render({
            elem: '#ad',
            type:'datetime'
        });
    })

    function initForm(data) {
        layui.use(['form'], function() {
            var form=layui.form;
            form.val("productFilter",{
                id:data.id,
                workname:data.workname,
                workingplace:data.workingplace,
                wage:data.wage,
                hangye:data.hangye,
                pingjia:data.pingjia,
                worktype:data.worktype,
            })
        })
    }
    function saveProduct() {
        $.ajax({
            url:'../web/addProduct',
            data:$("#productForm").serialize(),
            type:'post',
            dataType:'json',
            success:function (data) {
                if(!data){
                    layer.alert("保存失败",{icon:0})
                }
            }
        })
    }
</script>
</html>